
import org.gruposp2p.aularest.model.Course;
import org.gruposp2p.aularest.model.Coursegroup;
import org.gruposp2p.aularest.model.controller.CourseJpaController;
import org.gruposp2p.aularest.model.controller.CoursegroupJpaController;
import org.gruposp2p.aularest.service.AulaDataService;
import org.gruposp2p.aularest.service.AulaDataServiceImpl;

/**
 *
 * @author jj
 */
public class FindCourses {

    public static void main (String[] args) {
        FindCourses findCourses = new FindCourses();
        findCourses.findCoursegroup();
        //findCourses.findCoursegroup2();
        //findCourses.findCourse();
    }

    public void findCoursegroup () {
         AulaDataService dataService = new AulaDataServiceImpl();
        Coursegroup coursegroup =
                dataService.findCoursegroup(new Integer(2));
        System.out.println("coursegroup: " + coursegroup.getName());
    }

    public void findCoursegroup2() {

        CoursegroupJpaController grupoJpaController = new CoursegroupJpaController ();
        Coursegroup coursegroup =
                grupoJpaController.findCoursegroup(new Integer(2));
System.out.println("coursegroup: " + coursegroup.getName());

    }

    public void findCourse() {
        CourseJpaController courseJpaController = new CourseJpaController ();
        Course course = courseJpaController.findCourse(new Integer(1));
        System.out.println("course.getName(): " + course.getName());
        CoursegroupJpaController grupoJpaController = new CoursegroupJpaController ();
        Coursegroup coursegroup =
                grupoJpaController.findCoursegroup(new Integer(2));
        System.out.println("coursegroup: " + coursegroup.getName());
    }

}
